<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>定位</title>
	<style type="text/css">
		.box{
			width: 600px;
			height: 600px;
			background-color: gray;
			margin: 0 auto;
		}
		.box1{
			width: 100px;
			height: 100px;
			background-color: yellow;
			margin:10px 0 0 10px;
	
		}
		.box2{
			width: 100px;
			height: 100px;
			background-color: green;
			margin:10px 0 0 10px;
			position: relative;
			left:50px;
			top:120px;

		}
		.box3{
			width: 100px;
			height: 100px;
			background-color: yellow;
			margin:10px 0 0 10px;
			position: relative;
			left:5px;
			top:10px;
			z-index: 10;
		}
	</style>
</head>
<body>
	<div class="box">
		<div class="box1"></div>
		<div class="box2"></div>
		<div class="box3"></div>
	</div>
</body>
</html>